/* 基础样式 */
body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* 禁用 Tailwind ring 阴影效果 */
*,
*:focus,
*:active,
*:focus-visible {
  --tw-ring-shadow: none !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1E293B;
}
::-webkit-scrollbar-thumb {
  background: #3B82F6;
  border-radius: 4px;
}

/* 代码高亮样式 */
.code-block {
  position: relative;
  background: #1E293B;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: left;
  font-family: 'Fira Code', monospace;
  overflow-x: auto;
  transition: all 0.3s ease;
}
.code-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
}

/* 粒子背景容器 */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

/* 隐藏 fullPage.js 版权信息 */
.fp-watermark,
.fp-watermark a,
div[style*="position: absolute"][style*="z-index: 9999"][style*="bottom"],
div[style*="position: fixed"][style*="z-index: 9999"][style*="bottom"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 技术标签动画 */
.tech-tag {
  transition: all 0.3s ease;
}
.tech-tag:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* 技术图标轮播样式 */
.tech-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-width: 100px;
  cursor: pointer;
}

.tech-icon-item:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

.tech-icon-item img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.tech-icon-item:hover img {
  filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.4));
}

/* 轮播动画 */
@keyframes scroll-right {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

.animate-scroll-right {
  animation: scroll-right 30s linear infinite;
}

.animate-scroll-left {
  animation: scroll-left 30s linear infinite;
}

/* 鼠标悬停时暂停动画 */
.animate-scroll-right:hover,
.animate-scroll-left:hover {
  animation-play-state: paused;
}

/* ============ 动画组件样式 ============ */

/* 雨云动画 */
.cloud-container{
  position: relative;
  width: 400px;
  height: 600px;
  display: flex;
  justify-content: center;
}

.cloud-container .cloud{
  margin-top: 100px;
  position: relative;
  width: 320px;
  height: 100px;
  border-radius: 100px;
  filter: drop-shadow(8px 8px 0 #0005);
  animation: animateCloud 2s steps(1) infinite;
  cursor: grab;
  user-select: none;
  transition: transform 0.1s ease;
}

.cloud-container .cloud:active{
  cursor: grabbing;
  transform: scale(1.05);
}

.cloud-container .cloud.dragging{
  z-index: 1000;
  transform: scale(1.05);
}

@keyframes animateCloud{
  0%{
    filter: drop-shadow(8px 8px 0 #0001) drop-shadow(0 0 0 #fff) brightness(1);
  }
  95%{
    filter: drop-shadow(8px 8px 0 #0001) drop-shadow(0 0 50px #fff5) brightness(10);
  }
}

.cloud-container .cloud::before{
  content: '';
  position: absolute;
  top: -50px;
  left: 40px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #484f59;
  box-shadow: 90px -10px 0 30px #484f59;
}

.cloud-container .cloud::after{
  content: '';
  position: absolute;
  inset: 0;
  background-color: #484f59;
  border-radius: 100px;
}

.cloud-container .cloud .drop{
  position: absolute;
  top: 40px;
  background-color: #05a2eb;
  width: 2px;
  height: 10px;
  transform-origin: bottom;
  animation: animateDrop 2s linear infinite;
}

@keyframes animateDrop{
  0%{
    transform: translateY(0) scaleY(1);
  }
  70%{
    transform: translateY(385px) scaleY(1);
  }
  80%{
    transform: translateY(385px) scaleY(0.2);
  }
  100%{
    transform: translateY(385px) scaleY(0) scaleX(15);
  }
}

/* 指环加载动画 */
:root {
  font-size: calc(16px+(24-16)*(100vw-320px)/(1280-320));
}

.loading-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
  width: 17em;
  height: 17em;
  animation: tiltSpin 8s linear infinite;
  transform-style: preserve-3d;
}

.ring {
  position: relative;
  height: 3rem;
  width: 1.5rem;
  font-size: 2em;
  transform-style: preserve-3d;
  animation-name: spin;
  animation-duration: 4s;
  animation-iteration-count: inherit;
  animation-timing-function: inherit;
}

.ring:nth-child(even) {
  animation-direction: reverse;
}

.item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: inline-block;
  font-weight: 600;
  text-align: center;
  transform: rotateY(calc(var(--i)*calc(360/var(--n))*1deg)) translateZ(7rem);
}

.item:empty:before {
  display: inline-block;
  width: 100%;
  height: 100%;
  content: "";
  background: linear-gradient(transparent 45%,
      currentColor 45% 55%,
      transparent 55%);
}

@keyframes tiltSpin {
  from {
    transform: rotateY(0) rotateX(30deg);
  }

  to {
    transform: rotateY(1turn) rotateX(30deg);
  }
}

@keyframes spin {
  from {
    transform: rotateY(0);
  }

  to {
    transform: rotateY(1turn);
  }
}

/* 笑脸动画 */
.face{
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-color: #ffcd00;
  display: flex;
  justify-content: center;
  align-items: center;
}

.face::before{
  content: '';
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 25%;
  background-color: #b57700;
  border-bottom-left-radius: 70px;
  border-bottom-right-radius: 70px;
  transition: 0.5s;
}
.face:hover::before{
  top: 70%;
  height: 8%;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

.eyes{
  position: relative;
  top: -40px;
  display: flex;
}

.eyes .eye{
  position: relative;
  width: 80px;
  height:  80px;
  display: block;
  background-color: #fff;
  margin: 0 15px;
  border-radius: 50%;
}

.eyes .eye::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 25px;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: #333;
  border-radius: 50%;
}

/* ============ Tailwind 自定义样式 ============ */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* ============ FullPage.js 容器宽度修复 ============ */
/* 修复 fp-overflow 容器宽度限制问题 */
.fp-overflow {
  width: 100vw !important;
  max-width: none !important;
  overflow-x: visible !important;
}

/* 确保 fullpage 主容器也不受限制 */
#fullpage {
  width: 100% !important;
  max-width: none !important;
}

/* 修复 section 容器宽度 */
.fp-section {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* 确保图表和图标区域不受限制 */
.fp-overflow .section {
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

/* 专门针对技术图标轮播区域的修复 */
.fp-overflow .tech-icon-item {
  min-width: 120px !important;
  flex-shrink: 0 !important;
}

/* 图标轮播容器修复 - 简化版本，不破坏布局 */
.fp-overflow .animate-scroll-right,
.fp-overflow .animate-scroll-left {
  animation-duration: 30s !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
}

/* 图表容器宽度修复 */
.fp-overflow [id$="Chart"] {
  width: 100% !important;
  min-width: 400px !important;
}
